#include<bits/stdc++.h>
#define mk(a,b) make_pair(a,b)
using namespace std;
namespace IO{
    char buff[1<<21],*p1=buff,*p2=buff;
    char getch(){
        return p1==p2&&(p2=((p1=buff)+fread(buff,1,1<<21,stdin)),p1==p2)?EOF:*p1++;
    }
    template<typename T>
    void read(T &x){
        char ch=getch();int fl=1;x=0;
        while(ch>'9'||ch<'0'){if(ch=='-')fl=-1;ch=getch();}
        while(ch<='9'&&ch>='0'){x=x*10+ch-48;ch=getch();}
        x*=fl;
    }
    template<typename T,typename ...Args>
    void read(T &x,Args& ...args){
        read(x);read(args...);
    }
    char obuf[1<<21],*p3=obuf;
    void putch(char ch){
        if(p3-obuf<(1<<21))*p3++=ch;
        else fwrite(obuf,p3-obuf,1,stdout),p3=obuf,*p3++=ch;
    }
    char ch[100];
    template<typename T>
    void write(T x){
        if(!x)return putch('0');
        if(x<0)putch('-'),x*=-1;
        int top=0;
        while(x)ch[++top]=x%10+48,x/=10;
        while(top)putch(ch[top]),top--;
    }
    template<typename T,typename ...Args>
    void write(T x,Args ...args){
        write(x),putch(' '),write(args...);
    }
    void flush(){fwrite(obuf,p3-obuf,1,stdout);}
}
using namespace IO;
const int N=1e5+5;
int n,q,m;
int d[N],fa[N],dis[N];
int find(int x){return fa[x]==x?x:fa[x]=find(fa[x]);}
struct node{
	int x,y,p;
}a[N];
int asd[N];
vector<int>to[N];
void Init(int s){
	memset(asd,0,sizeof asd);
	asd[s]=1;
	queue<int>Q;
	Q.push(s);
	while(Q.size()){
		int x=Q.front();
		Q.pop();
		for(auto y:to[x]){
			if(!asd[y]){
				asd[y]=asd[x]+1;
				Q.push(y);
			}
		}
	}
	for(int i=1;i<=n;i++)asd[i]--;
}
void sol(int s,int t,int p){
	Init(s);
	memset(dis,-1,sizeof dis);
	dis[s]=max(d[s],p);
	priority_queue<pair<int,int>,vector<pair<int,int> >,less<pair<int,int> > >Q;
	Q.push(mk(dis[s],s));
	for(int i=1;i<=n;i++){
		if(d[i]&&asd[i]<=p){
			dis[i]=d[i];
			Q.push(mk(dis[i],i));
		}
	}
	while(!Q.empty()){
		int x=Q.top().second,t=Q.top().first;
		Q.pop();
		if(t<dis[x])continue;
		if(!dis[x])continue;
		for(auto y:to[x]){
			if(t-1>dis[y]){
				dis[y]=t-1;
				Q.push(mk(dis[y],y));
			}
		}
	}
	if(dis[t]>=0)putch('Y'),putch('E'),putch('S'),putch('\n');
	else putch('N'),putch('O'),putch('\n');
}
signed main(){
	freopen("shu.in","r",stdin);
	freopen("shu.out","w",stdout);
	read(n,m,q);
	for(int i=1;i<n;i++){
		int u,v;
		read(u,v);
		to[u].push_back(v);
		to[v].push_back(u);
	}
	for(int i=1;i<=q;i++)read(a[i].x,a[i].y,a[i].p);
	for(int i=1;i<=m;i++){
		int x,y;
		read(x,y);
		d[x]=max(d[x],y);
	}
	for(int i=1;i<=q;i++)sol(a[i].x,a[i].y,a[i].p);
	flush();
	return 0;
}/*
10 3 6
2 1
3 1
4 2
5 1
6 2
7 1
8 2
9 5
10 6
7 2 3
2 6 1
8 8 3
8 6 3
10 3 1
7 9 2
9 1
7 2
8 1

*/
